<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .content{
            height: 600px;
            width: 400px;
            border: 1px red solid;
            overflow: auto;
        }
        .test{
             display: flex;
            flex-direction: column;
            align-items: center;
        }
    </style>
</head>
<body>
<div class="content">
    <div class="test">
        <div>1</div>
        <div>2</div>
    </div>
    <div class="test">
        <div>1</div>
        <div>2</div>
    </div>
    <div class="test">
        <div>1</div>
        <div>2</div>
    </div>
    <div class="test">
        <div>1</div>
        <div>2</div>
    </div>
    <div class="test">
        <div>1</div>
        <div>2</div>
    </div>
</div>
<script>

  function test(num) {

     var temp = parseInt(Math.sqrt(num))

      for (var i=2; i<=temp; i++){
          if(num % i == 0){
              return false
          }
      }
      return true;
  }

  var reg = /[^\{}]*\{(.*)\}[^\}]*/;
  var str = "1111{122}";
  console.log(str.replace(reg,'$1'));

alert(test(7))
</script>
</body>
</html>